package ynu.edu.achitecturework.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import ynu.edu.achitecturework.common.entity.LogicEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "greenhouse")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class Greenhouse extends LogicEntity {

    @Column(nullable = false)
    private String name;

    @Column(nullable = false)
    private String address;

    @Column(nullable = false)
    private Double area;

    @Column(nullable = false, unique = true)
    private String boxNo;
}